
#include <iostream>
#include <vector>

class Stack {
private:
    std::vector<int> items;

public:
    Stack() {
        
    }

    bool isEmpty() {
        return items.empty();
    }

    void push(int item) {
        items.push_back(item);
    }

    int pop() {
        if (!isEmpty()) {
            int top = items.back();
            items.pop_back();
            return top;
        }
        else {
            
            return -1;
        }
    }

    int peek() {
        if (!isEmpty()) {
            return items.back();
        }
        else {
            
            return -1; 
        }
    }
};

int main() {
    Stack s;

    if (!s.isEmpty()) {
        std::cout << "Stack is not empty." << std::endl;
    }
    else {
        std::cout << "Stack is empty." << std::endl;
    }

    for (char c : {'a', 'b', 'c', 'd', 'e'}) {
        s.push(c);
    }

    if (!s.isEmpty()) {
        std::cout << "Stack is not empty." << std::endl;
    }
    else {
        std::cout << "Stack is empty." << std::endl;
    }

    
    std::vector<int> stackSequence;
    while (!s.isEmpty()) {
        stackSequence.push_back(s.pop());
    }

    std::cout << "Stack pop sequence:";
    for (int item : stackSequence) {
        std::cout << " " << item;
    }
    std::cout << std::endl;

    if (!s.isEmpty()) {
        std::cout << "Stack is not empty." << std::endl;
    }
    else {
        std::cout << "Stack is empty." << std::endl;
    }

    return 0;
}